<div class="page-header">
    <h1>Mes Offres</h1>
</div>

<div class="row" style="margin-bottom: 20px;">
    <div class="col-md-12">
        <form class="form form-inline">

            <div class="form-group">
                <div class="input-group">
                    <input type="text" class="form-control" ng-model="q" ></input>
                    <span class="input-group-btn">
                        <button class="btn btn-default" ng-click="search()"><span class="fa fa-search"></span></button>    
                    </span>
                </div>
            </div>
            <div class="form-group  pull-right">
                <button class="btn btn-success btn-block" ng-click="initAdd()" style="min-width: 120px"><i class="fa fa-plus-circle"></i><msg key="add"></msg></button>
            </div>
        </form>
    </div>
</div>

<div class="row">
    <div class="col-md-12">
        <div class="table-responsive">
            <table class="table table-striped table-hover">
                <th>
                <msg key="offre"></msg>
                </th>
                <th>
                <msg key="montant"></msg>
                </th>
                <th>
                <msg key="dateOffre"></msg>
                </th>
                <th>
                <msg key="statut"></msg>
                </th>
                </tr>
                <tr ng-repeat="offre in offres|orderBy:-id">
<!--                     <td><a ng-href="#/produit/{{produit.id}}">{{produit.name}}</a></td> -->
                    <td><a ng-href="#/offres/{{offre.id}}">consulter</a></td>
                    <td>{{offre.montant}}</td>
                    <td>{{offre.dateOffre}}</td>
                    <td>{{offre.statut}}</td>
                </tr>
            </table>
        </div>
    </div>
</div> 
<pagination boundary-links="true" total-items="totalItems" items-per-page="10" ng-model="p" ng-change="search()" class="pagination" previous-text="&lsaquo;" next-text="&rsaquo;" first-text="&laquo;" last-text="&raquo;"></pagination>

 <div class="modal fade" id="produitDialog" tabindex="-1" role="dialog"
         aria-labelledby="myModalLabel" aria-hidden="true">
        <div class="modal-dialog">
            <div class="modal-content">
                <div class="modal-header">
                    <button type="button" class="close" data-dismiss="modal"
                            aria-hidden="true">&times;</button>
                    <h4 class="modal-title" id="myModalLabel">
                        <msg key="addProduit"></msg>
                    </h4>
                </div>
                <div class="modal-body">
                    <div class="form form-horizontal">
<!--                         <div class="form-group"> -->
<!--                             <label class="control-label col-md-3" for="name"><msg -->
<!--                                     key="name"></msg></label> -->
<!--                             <div class="col-md-6"> -->
<!--                                 <input class="form-control" id="nom" -->
<!--                                        ng-model="produit.nom" ng-required="true" /> -->
<!--                             </div> -->
<!--                         </div> -->
                        <div class="form-group">
                            <label for="nom" class="control-label col-md-3"><msg
                                    key="nom"></msg></label>
                            <div class="col-md-6">
                                <input class="form-control" type="text" id="nom"
                                       ng-model="produit.nom" ng-required="true" />
                            </div>
                        </div>
                        <div class="form-group">
                            <label class="control-label col-md-20" for=prixDepart><msg
                                    key="prixDepart"></msg></label>
                            <div class="col-md-6">
                                <input class="form-control" type="text" id="prixDepart"
                                       ng-model="produit.prixDepart" ng-required="true" />
                            </div>
                        </div>
                        <div class="form-group">
                            <label class="control-label col-md-20" for=description><msg
                                    key="description"></msg></label>
                            <div class="col-md-6">
                                <input class="form-control" type="text" id="description"
                                       ng-model="produit.description" ng-required="true" />
                            </div>
                        </div>                    </div>
                </div>
                <div class="modal-footer">
                    <button type="button" ng-click="save()" class="btn btn-primary">
                        <msg key="save"></msg>
                    </button>
                    <button type="button" class="btn btn-default" data-dismiss="modal">
                        <msg key="cancel"></msg>
                    </button>
                </div>
            </div>
        </div>
    </div>